package com.sg.dto.biz.app.common;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc SubTargetContentDto
 * @使用场景
 */
@Data
public class SubTargetContentDto extends BaseDto implements Serializable {

    /**
     * 目标内容类型编码 TARGET:目标 TARGET_CATEGORY:目标分类 OBJECTIVE:指标
     */
    @ApiModelProperty("目标内容类型编码")
    private String targetContentTypeCode;

    /**
     * 目标内容ID
     */
    @ApiModelProperty("目标内容ID")
    private String tagetContentId;

    /**
     * 目标内容标识
     */
    @ApiModelProperty("目标内容标识")
    private String targetContentCode;

    /**
     * 目标内容名称
     */
    @ApiModelProperty("目标内容名称")
    private String targetContentName;

    /**
     * 是否末级目标内容 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否末级目标内容")
    private String isLastTargetContent;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        SubTargetContentDto that = (SubTargetContentDto) o;
        return targetContentTypeCode == that.targetContentTypeCode && tagetContentId == that.tagetContentId && targetContentCode == that.targetContentCode && targetContentName == that.targetContentName && isLastTargetContent == that.isLastTargetContent;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), targetContentTypeCode, tagetContentId, targetContentCode, targetContentName, isLastTargetContent);
    }

}
